#ifndef OMG_TDDS_POLICY_HPP_ 
#define OMG_TDDS_POLICY_HPP_

/* Copyright (c) 2009-2010, Real-Time Innovations, Inc.
 * Copyright (c) 2010, Object Management Group, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * - Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 * - Neither the names of the above copyright holders nor the names of their
 *   contributors may be used to endorse or promote products derived from
 *   this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL A COPYRIGHT HOLDER OR CONTRIBUTOR BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */


/**
 * The purpose of this QoS is to allow the application to attach additional
 * information to the created Entity objects such that when a remote application
 * discovers their existence it can access that information and use it for its
 * own purposes. One possible use of this QoS is to attach security credentials
 * or some other information that can be used by the remote application to
 * authenticate the source. In combination with operations such as
 * ignore_participant, ignore_publication, ignore_subscription,
 * and ignore_topic these QoS can assist an application to define and enforce
 * its own security policies. The use of this QoS is not limited to security,
 * rather it offers a simple, yet flexible extensibility mechanism.
 */
template <typename DELEGATE>
class tdds::core::policy::UserData : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(UserData)
    
public:
    explicit UserData(const uint8_t* value_begin, const uint8_t* value_end);
    
    /**
     * Create a <code>UserData</code> instance.
     *
     * @param value the sequence of octet representing the user data
     */
    explicit UserData(const dds::core::ByteSeq& value);
    
public:
    const uint8_t* value_begin() const;
    const uint8_t* value_end() const;
    
    /**
     * Set the value for the user data.
     */
    template <typename OCTET_ITER>
    void set_value(OCTET_ITER begin, OCTET_ITER end);
    
private:
    friend class OMG_DDS_USER_DATA_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(UserData, 1, "UserData")


template <typename DELEGATE>
class tdds::core::policy::Durability : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Durability)
    
public:
    enum Kind {
        VOLATILE_KIND,
        TRANSIENT_LOCAL_KIND,
#ifdef OMG_DDS_PERSISTENCE_SUPPORT
        TRANSIENT_KIND,
        PERSISTENT_KIND
#endif  // OMG_DDS_PERSISTENCE_SUPPORT
    };
    
public:
    explicit Durability(Kind kind);
    
public:
    Kind kind() const;
    Kind& kind();
    
private:
    friend class OMG_DDS_DURABILITY_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Durability, 2, "Durability")


template <typename DELEGATE>
class tdds::core::policy::Presentation : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Presentation)
    
public:
    enum AccessScopeKind {
        INSTANCE_KIND,
        TOPIC_KIND,
#ifdef OMG_DDS_OBJECT_MODEL_SUPPORT
        GROUP_KIND
#endif  // OMG_DDS_OBJECT_MODEL_SUPPORT
    };		
    
public:
    explicit Presentation(AccessScopeKind access_scope,
                          bool coherent_access = false,
                          bool ordered_access = false);
    
public:
    AccessScopeKind access_scope() const;
    AccessScopeKind& access_scope();
    
    bool coherent_access() const;
    bool& coherent_access();
    
    bool ordered_access() const;
    bool& ordered_access();
    
private:
    friend class OMG_DDS_PRESENTATION_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Presentation, 3, "Presentation")


/**
 * This policy is useful for cases where a Topic is expected to have each
 * instance updated periodically. On the publishing side this setting
 * establishes a contract that the application must meet. On the subscribing
 * side the setting establishes a minimum requirement for the remote publishers
 * that are expected to supply the data values. When the Service ‘matches’ a
 * DataWriter and a DataReader it checks whether the settings are compatible
 * (i.e., offered deadline period<= requested deadline period) if they are not,
 * the two entities are informed (via the listener or condition mechanism)
 * of the incompatibility of the QoS settings and communication will not occur.
 * Assuming that the reader and writer ends have compatible settings, the
 * fulfillment of this contract is monitored by the Service and the application
 * is informed of any violations by means of the proper listener or condition.
 * The value offered is considered compatible with the value requested if and
 * only if the inequality “offered deadline period <= requested deadline period”
 * evaluates to ‘TRUE.’ The setting of the DEADLINE policy must be set
 * consistently with that of the TIME_BASED_FILTER.
 * For these two policies to be consistent the settings must be such that
 * “deadline period>= minimum_separation.”
 */
template <typename DELEGATE>
class tdds::core::policy::Deadline : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Deadline)

public:
    explicit Deadline(const dds::core::Duration& period);

public:
    const dds::core::Duration& period() const;
    dds::core::Duration& period();
    
private:
    friend class OMG_DDS_DEADLINE_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Deadline, 4, "Deadline")


template <typename DELEGATE>
class tdds::core::policy::LatencyBudget : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(LatencyBudget)
    
public:
    explicit LatencyBudget(const dds::core::Duration& duration);
    
public:
    const dds::core::Duration& duration() const;
    dds::core::Duration& duration();
    
private:
    friend class OMG_DDS_LATENCY_BUDGET_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(LatencyBudget, 5, "LatencyBudget")


template <typename DELEGATE>
class tdds::core::policy::Ownership : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Ownership)
    
public:
    enum Kind {
        SHARED_KIND,
#ifdef OMG_DDS_OWNERSHIP_SUPPORT
        EXCLUSIVE_KIND
#endif  // OMG_DDS_OWNERSHIP_SUPPORT
    };
    
public:
    explicit Ownership(Kind kind);
    
public:
    Kind kind() const;
    Kind& kind();
    
private:
    friend class OMG_DDS_OWNERSHIP_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Ownership, 6, "Ownership")


#ifdef OMG_DDS_OWNERSHIP_SUPPORT

template <typename DELEGATE>
class tdds::core::policy::OwnershipStrength : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(OwnershipStrength)
    
public:
    explicit OwnershipStrength(int32_t value);
    
public:
    int32_t value() const;
    int32_t& value();
    
private:
    friend class OMG_DDS_OWNERSHIP_STRENGTH_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(OwnershipStrength, 7, "OwnershipStrength")

#endif  // OMG_DDS_OWNERSHIP_SUPPORT


template <typename DELEGATE>
class tdds::core::policy::Liveliness : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Liveliness)

public:
    enum Kind {
        AUTOMATIC_KIND,
        MANUAL_BY_PARTICIPANT_KIND,
        MANUAL_BY_TOPIC_KIND
    };
    
public:
    explicit Liveliness(Kind kind,
                        const dds::core::Duration& lease_duration =
                            dds::core::Duration::infinite());

public:
    Kind kind() const;
    Kind& kind();
    
    const dds::core::Duration& lease_duration() const;
    dds::core::Duration& lease_duration();
    
private:
    friend class OMG_DDS_LIVELINESS_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Liveliness, 8, "Liveliness")


template <typename DELEGATE>
class tdds::core::policy::TimeBasedFilter : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(TimeBasedFilter)

public:
    explicit TimeBasedFilter(const dds::core::Duration& minimum_separation);

public:
    const dds::core::Duration& minimum_separation() const;
    dds::core::Duration& minimum_separation();
    
private:
    friend class OMG_DDS_TIME_BASED_FILTER_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(TimeBasedFilter, 9, "TimeBasedFilter")


template <typename DELEGATE>
class tdds::core::policy::Partition : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Partition)

public:
    explicit Partition(const std::string& name);
    explicit Partition(const dds::core::StringSeq& name);

public:
    const dds::core::StringSeq& name() const;
    dds::core::StringSeq& name();

private:
    friend class OMG_DDS_PARTITION_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Partition, 10, "Partition")


template <typename DELEGATE>
class tdds::core::policy::Reliability : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Reliability)

public:
    enum Kind {
        BEST_EFFORT_KIND = 0,
        RELIABLE_KIND    = 1
    };

public:
    explicit Reliability(Kind kind,
                         const dds::core::Duration& max_blocking_time =
                                dds::core::Duration(0, 100000000 /*100 ms*/));

public:
    Kind kind() const;
    Kind& kind();

    const dds::core::Duration& max_blocking_time() const;
    dds::core::Duration& max_blocking_time();

private:
    friend class OMG_DDS_RELIABILITY_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Reliability, 11, "Reliability")


template <typename DELEGATE>
class tdds::core::policy::DestinationOrder : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(DestinationOrder)

public:
    enum Kind {
        BY_RECEPTION_TIMESTAMP_KIND,
        BY_SOURCE_TIMESTAMP_KIND
    };

public:
    explicit DestinationOrder(Kind kind);

public:
    Kind kind() const;
    Kind& kind();
    
private:
    friend class OMG_DDS_DESTINATION_ORDER_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(DestinationOrder, 12, "DestinationOrder")


template <typename DELEGATE>
class tdds::core::policy::History : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(History)

public:
    enum Kind {
        KEEP_LAST_KIND,
        KEEP_ALL_KIND
    };
    
public:
    explicit History(Kind kind,
                     int32_t depth = dds::core::LENGTH_UNLIMITED);
    
public:
    Kind kind() const;
    Kind& kind();

    int32_t depth() const;
    int32_t& depth();

private:
    friend class OMG_DDS_HISTORY_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(History, 13, "History")


template <typename DELEGATE>
class tdds::core::policy::ResourceLimits : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(ResourceLimits)

public:
    explicit ResourceLimits(int32_t max_samples,
                            int32_t max_instances =
                                    dds::core::LENGTH_UNLIMITED,
                            int32_t max_samples_per_instance =
                                    dds::core::LENGTH_UNLIMITED);

public:
    int32_t max_samples() const;
    int32_t& max_samples();

    int32_t max_instances() const;
    int32_t& max_instances();

    int32_t max_samples_per_instance() const;
    int32_t& max_samples_per_instance();
    
private:
    friend class OMG_DDS_RESOURCE_LIMITS_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(ResourceLimits, 14, "ResourceLimits")


/**
 * This policy controls the behavior of the Entity as a factory for other
 * entities. This policy concerns only DomainParticipant (as factory for
 * Publisher, Subscriber, and Topic), Publisher (as factory for DataWriter),
 * and Subscriber (as factory for DataReader). This policy is mutable.
 * A change in the policy affects only the entities created after the change;
 * not the previously created entities.
 * The setting of autoenable_created_entities to TRUE indicates that the
 * newly created object will be enabled by default.
 * A setting of FALSE indicates that the Entity will not be automatically
 * enabled. The application will need to enable it explicitly by means of the
 * enable operation (see Section 7.1.2.1.1.7, “enable”). The default setting
 * of autoenable_created_entities = TRUE means that, by default, it is not
 * necessary to explicitly call enable on newly created entities.
 */
template <typename DELEGATE>
class tdds::core::policy::EntityFactory : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(EntityFactory)

public:
    explicit EntityFactory(bool autoenable_created_entities);

public:
    bool autoenable_created_entities() const;
    bool& autoenable_created_entities();
    
private:
    friend class OMG_DDS_ENTITY_FACTORY_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(EntityFactory, 15, "EntityFactory")


template <typename DELEGATE>
class tdds::core::policy::WriterDataLifecycle : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(WriterDataLifecycle)

public:
    explicit WriterDataLifecycle(bool autodispose_unregistered_instances);

public:
    bool autodispose_unregistered_instances() const;
    bool& autodispose_unregistered_instances();
    
private:
    friend class OMG_DDS_WRITER_DATA_LIFECYCLE_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(WriterDataLifecycle, 16, "WriterDataLifecycle")


template <typename DELEGATE>
class tdds::core::policy::ReaderDataLifecycle : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(ReaderDataLifecycle)

public:
    explicit ReaderDataLifecycle(
        const dds::core::Duration& autopurge_nowriter_samples_delay,
        const dds::core::Duration& autopurge_disposed_samples_delay =
                                 dds::core::Duration::infinite());

public:
    const dds::core::Duration& autopurge_nowriter_samples_delay() const;
    dds::core::Duration& autopurge_nowriter_samples_delay();

    const dds::core::Duration& autopurge_disposed_samples_delay() const;
    dds::core::Duration& autopurge_disposed_samples_delay();

private:
    friend class OMG_DDS_READER_DATA_LIFECYCLE_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(ReaderDataLifecycle, 17, "ReaderDataLifecycle")


/**
 * The purpose of this QoS is to allow the application to attach additional
 * information to the created Topic such that when a remote application
 * discovers their existence it can examine the information and use it in
 * an application-defined way. In combination with the listeners on the
 * DataReader and DataWriter as well as by means of operations such as
 * ignore_topic, these QoS can assist an application to extend the provided QoS.
 */
template <typename DELEGATE>
class tdds::core::policy::TopicData : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(TopicData)

public:
    explicit TopicData(const uint8_t* value_begin, const uint8_t* value_end);
    explicit TopicData(const dds::core::ByteSeq& value);

public:
    const uint8_t* value_begin() const;
    const uint8_t* value_end() const;

    template <typename OCTET_ITER>
    void set_value(OCTET_ITER begin, OCTET_ITER end);

private:
    friend class OMG_DDS_TOPIC_DATA_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(TopicData, 18, "TopicData")


/**
 * The purpose of this QoS is to allow the application to attach additional
 * information to the created Publisher or Subscriber.
 * The value of the GROUP_DATA is available to the application on the
 * DataReader and DataWriter entities and is propagated by means of the
 * built-in topics. This QoS can be used by an application combination with
 * the DataReaderListener and DataWriterListener to implement matching policies
 * similar to those of the PARTITION QoS except the decision can be made based
 * on an application-defined policy.
 */
template <typename DELEGATE>
class tdds::core::policy::GroupData : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(GroupData)

public:
    explicit GroupData(const uint8_t* value_begin, const uint8_t* value_end);

    /**
     * Create a <code>GroupData<code> instance.
     *
     * @param value the group data value
     */
    explicit GroupData(const dds::core::ByteSeq& value);
    
public:
    const uint8_t* value_begin() const;
    const uint8_t* value_end() const;

    /**
     * Set the value for this <code>GroupData</code>
     */
    template <typename OCTET_ITER>
    void set_value(OCTET_ITER begin, OCTET_ITER end);
    
private:
    friend class OMG_DDS_GROUP_DATA_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(GroupData, 19, "GroupData")


/**
 * The purpose of this QoS is to allow the application to take advantage of
 * transports capable of sending messages with different priorities.
 * This policy is considered a hint. The policy depends on the ability of the
 * underlying transports to set a priority on the messages they send.
 * Any value within the range of a 32-bit signed integer may be chosen;
 * higher values indicate higher priority. However, any further interpretation
 * of this policy is specific to a particular transport and a particular
 * implementation of the Service. For example, a particular transport is
 * permitted to treat a range of priority values as equivalent to one another.
 * It is expected that during transport configuration the application would
 * provide a mapping between the values of the TRANSPORT_PRIORITY set on
 * DataWriter and the values meaningful to each transport. This mapping would
 * then be used by the infrastructure when propagating the data written by
 * the DataWriter.
 */
template <typename DELEGATE>
class tdds::core::policy::TransportPriority : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(TransportPriority)

public:
    explicit TransportPriority(int32_t value);

public:
    int32_t value() const;
    int32_t& value();
    
private:
    friend class OMG_DDS_TRANSPORT_PRIORITY_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(TransportPriority, 20, "TransportPriority")


/**
 * The purpose of this QoS is to avoid delivering “stale” data to the
 * application. Each data sample written by the DataWriter has an associated
 * expiration time beyond which the data should not be delivered to any
 * application. Once the sample expires, the data will be removed from the
 * DataReader caches as well as from the transient and persistent
 * information caches. The expiration time of each sample is computed by
 * adding the duration specified by the LIFESPAN QoS to the source timestamp.
 * As described in Section 7.1.2.4.2.11, “write and Section 7.1.2.4.2.12,
 * write_w_timestamp the source timestamp is either automatically computed by
 * the Service each time the DataWriter write operation is called, or else
 * supplied by the application by means of the write_w_timestamp operation.
 *
 * This QoS relies on the sender and receiving applications having their clocks
 * sufficiently synchronized. If this is not the case and the Service can
 * detect it, the DataReader is allowed to use the reception timestamp instead
 * of the source timestamp in its computation of the expiration time.
 */
template <typename DELEGATE>
class tdds::core::policy::Lifespan : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(Lifespan)

public:
    explicit Lifespan(const dds::core::Duration& duration);

public:
    const dds::core::Duration& duration() const;
    dds::core::Duration& duration();

private:
    friend class OMG_DDS_LIFESPAN_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(Lifespan, 21, "Lifespan")


#ifdef OMG_DDS_PERSISTENCE_SUPPORT

template <typename DELEGATE>
class tdds::core::policy::DurabilityService : public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(DurabilityService)

public:
    explicit DurabilityService(
        const dds::core::Duration& service_cleanup_delay,
        dds::core::policy::History::Kind =
                               dds::core::policy::History::KEEP_LAST_KIND,
        int32_t history_depth = dds::core::LENGTH_UNLIMITED,
        int32_t max_samples = dds::core::LENGTH_UNLIMITED,
        int32_t max_instances = dds::core::LENGTH_UNLIMITED,
        int32_t max_samples_per_instance = dds::core::LENGTH_UNLIMITED);

public:
    const dds::core::Duration& service_cleanup_delay() const;
    dds::core::Duration& service_cleanup_delay();

    dds::core::policy::History::Kind history_kind() const;
    dds::core::policy::History::Kind& history_kind();

    int32_t history_depth() const;
    int32_t& history_depth();

    int32_t max_samples() const;
    int32_t& max_samples();

    int32_t max_instances() const;
    int32_t& max_instances();

    int32_t max_samples_per_instance() const;
    int32_t& max_samples_per_instance();

private:
    friend class OMG_DDS_DURABILITY_SERVICE_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(DurabilityService, 22, "DurabilityService")

#endif  // OMG_DDS_PERSISTENCE_SUPPORT


#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT

template <typename DELEGATE>
class tdds::core::policy::DataRepresentation :
public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(DataRepresentation)

public:
    explicit DataRepresentation(
        const dds::core::policy::DataRepresentationIdSeq& value);

public:
    const dds::core::policy::DataRepresentationIdSeq value() const;

    dds::core::policy::DataRepresentationIdSeq&
    value(dds::core::policy::DataRepresentationIdSeq dst) const;

    void value(const dds::core::policy::DataRepresentationIdSeq& value);

    // --- State: --- //
private:
    friend class OMG_DDS_DATA_REPRESENTATION_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(DataRepresentation, 23, "DataRepresentation")

#endif  // defined(OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT)


#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT

template <typename DELEGATE>
class tdds::core::policy::TypeConsistencyEnforcement :
public dds::core::Value
{
    OMG_DDS_VALUE_TYPE(TypeConsistencyEnforcement)

public:
    enum Kind {
        EXACT_TYPE_TYPE_CONSISTENCY,
        EXACT_NAME_TYPE_CONSISTENCY,
        DECLARED_TYPE_CONSISTENCY,
        ASSIGNABLE_TYPE_CONSISTENCY
    };
    
public:
    explicit TypeConsistencyEnforcement(Kind kind);

public:
    Kind kind() const;
    void kind(Kind value);

    // --- State: --- //
private:
    friend class OMG_DDS_TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_DELEGATE;
    DELEGATE impl_;
};

OMG_DDS_POLICY_TRAITS(TypeConsistencyEnforcement, 24, "TypeConsistencyEnforcement")

#endif  // defined(OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT)


#endif // !defined(OMG_TDDS_POLICY_HPP_)
